<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<script type="text/javascript" src="js/jquery.js"></script>
		<link rel="stylesheet" href="css/jquery-ui.min.css" />
		<link rel="stylesheet" href="css/chosen.css" />
		<script type="text/javascript" src="js/jquery-ui.min.js"></script>
		<script type="text/javascript" src="js/jq-extends.js"></script>
		<script type="text/javascript" src="js/bootstrap.min.js"></script>
		<script type="text/javascript" src="css/chosen.jquery.js"></script>
		<script type="text/javascript" src="js/jquery.iframe-transport.js"></script>
		<script type="text/javascript" src="js/jquery.fileupload.js"></script>
		<script type="text/javascript" src="js/nojs.js"></script>
		<script type="text/javascript" src="js/nojs-module-file.js"></script>
		<script>
			$(function() {
				var $linkage = {
					selector:"[data-linkage=true]",
					init: function(context){
						$(this.selector, context).each(function(){
							var $parentSelect = $(this);
							var url = $parentSelect.data("linkageUrl");
							var target =  $parentSelect.data("linkageTarget")
							console.info(url + "   " + target);
							
							if(url && target &&  $(target, context).size() > 0){
								var $target = $(target, context);
								$target.append('<option value="1">aaa</option>')
								$target.append('<option value="1">bb</option>')
							}
						});
						
					}
				}.init(document);
			});
		</script>
	</head>

	<body>

		<div class="container">

			<form method="post" enctype="multipart/form-data" action="http://192.168.1.199/wroot-blog/console/ajax/upfile">
				<div class="form-group">
					<label for="parentId" class="col-sm-2 control-label">所在部门</label>
					<div class="col-sm-6 ">
						<select class="form-control" id="parentId" style="width:40%;" data-linkage="true" data-linkage-target="#deptId" data-linkage-url="${ctx }/console/system/user/depts">
							<option value="">--请选择--</option>
							<c:forEach items="${parentDepts }" var="cur">
								<option value="${cur.id">--${cur.name }--</option>
							</c:forEach>
						</select>
						<select class="form-control" name="deptId" id="deptId" data-value="${entity.deptId }" style="width:40%;">
							<option value="">--请选择--</option>
						</select>
					</div>
					<div class="col-sm-4  help-inline form-control-static"></div>
				</div>
				<button type="submit" class="btn">提交</button>
			</form>
		</div>
	</body>

</html>